class_name Campfire
extends Control

@export var char_stats: CharacterStats

@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var reset_button: Button = %ResetButton

func _on_reset_button_pressed() -> void:
	reset_button.disabled = true
	char_stats.heal(ceili(char_stats.max_health * 0.3))
	animation_player.play("fade_out")
	
func _on_fade_out_finished() -> void:
	Events.do_campfire_exited()
